Dim TDP(25,25),TDPTS(25,25),TDG(25,25),TDH1(25,2),TDH2(25,2),TDH3(25,2),TDA1(25,2),TDA2(25,2),TDA3(25,2),TDM1(25,25),TDM2(25,25),FM$(25,25)
Global TDP(),TDPTS(),TDG(),TDH1(),TDH2(),TDH3(),TDA1(),TDA2(),TDA3(),TDM1(),TDM2(),FM$()
Dim B$(3),L$(4),T$(5),M$(40),LG$(25),TEAMS(25),TEAM$(25,25),X1(29),Y1(29),T1FXL$(22,100),T2FXL$(22,100),FXLN$(22),POOLSTAT(100),MIL(22),BL$(12),CL$(12),PM$(3)
Global B$(),L$(),TITLE$,T$(),M$(),LG$(),EX,TEAMS(),TEAM$(),TEAMMEN,EMOD,X1(),Y1(),NAMES,CURRL,T1FXL$(),T2FXL$(),FXLN$(),MLISTEXIST,TEAMA$,TEAMB$,POOLSTAT(),MIL(),PLEXIST,LIST,BL$(),CL$(),ZEB,NOCHK,ESC,MTCH,PM$(),ALTERFLAG
Dim RESA$(25),RESB$(25),RES(25),SCORE1(25),SCORE2(25),LGPOS(25,25),LP$(25),LPTS(25),T1LGP(25,100),T2LGP(25,100),MLG1(25,100),MLG2(25,100)
Global RESA$(),RESB$(),RES(),SCORE1(),SCORE2(),LGPOS(),LP$(),LPTS(),T1LGP(),T2LGP(),MLG1(),MLG2(),LIST
Dim T1M1(22,100),T1M2(22,100),T2M1(22,100),T2M2(22,100),GOALS1(22,2),GOALS2(22,2),PRED(100),ST(100),PREDNO(100),PRED$(100),SHOCK(40),SHOCK$(40),ID(22)
Global T1M1(),T1M2(),T2M1(),T2M2(),GOALS1(),GOALS2(),PRED(),ST(),PRED$(),PREDNO(),SHOCK(),SHOCK$(),ID2$,FLOADED,ID()
Dim LGA(100),LGB(100),R(20),ODDS#(10),D$(15)
Global LGA(),LGB(),ADN,R(),ODDS#(),D$()
Make Icon Mask
SETUP
DEMO
Sam Play 1
MAINMENU
Procedure DEMO
D$(1)="Would you buy a new car without taking it for a test drive first?"
D$(2)="Of course not, you might not like it!"
D$(4)="This version of Pro-Football has been designed to let you 'test-drive' the software"
D$(5)="before you part with any of that hard-earned cash."
D$(7)="If after having a look at Pro-Football, you decide that it's not for you, then just"
D$(8)="format the disk and use it for something else - If on the other hand you like what "
D$(9)="you see (as I hope you will!), then you can buy in 100% confidence, safe in the"
D$(10)="knowledge that you know what you're getting ..."
DTEXT
D$(1)="So what are you getting?"
D$(3)="Pro-Football has been designed to be an exceptionally quick & easy to use, yet"
D$(4)="powerful, package that can generate predictions for use on both football pools"
D$(5)="and fixed odds betting."
D$(7)="Every aspect of the program has been created with the user in mind - something"
D$(8)="that is sadly lacking in many programs these days."
D$(10)="OK, so what does this demo version consist of ? ...."
DTEXT
D$(1)="INTELLIBET, Pro-Football's artificial intelligence system, does need to be fully"
D$(2)="up to date in order for accurate predictions to be made."
D$(4)="The full version of the program comes with data of all matches up to the day"
D$(5)="of despatch - unfortunately, this is not possible with the demo version, as you"
D$(6)="could be reading this weeks, months or years after the disk was created!"
D$(8)="There is no way round this (other than make you sit around entering months worth"
D$(9)="of results!), so really you are NOT going to be able to make useable predictions"
D$(10)="with this version - sorry!"
DTEXT
D$(1)="What this program WILL let you do, is try out every part of Pro-Football."
D$(3)="You will be able to go through the process of creating fixture lists, making"
D$(4)="predictions, and entering results - the only thing is that the predictions won't"
D$(5)="be useable (so don't go betting your life savings on them!), and the results won't"
D$(6)="be stored for future use (there wouldn't be much point if large amounts of previous"
D$(7)="data are missing)."
D$(9)="After using the demo, you will have found out all you need to know about Pro-Football,"
D$(10)="you will have learned how to use it, and it won't have cost you a penny!"
DTEXT
D$(1)="Full instructions are contained in the User-Guide (the main menu is coming up next,"
D$(2)="hold down the right mouse button and select User-Guide from the pull down menu at the"
D$(3)="top of the screen)."
D$(5)="Details on how to get your hands on the full, unrestricted version with a completely"
D$(6)="up to date set of results are also given in the User-Guide."
D$(8)="I hope you enjoy using this demo - should you run into any difficulties whatsoever, or"
D$(9)="would like to comment on any aspect of the program, then please don't hesitate to get"
D$(10)="in touch - Ali Prior, 10 Lovell Park Heights, Leeds, LS7 1DP."
For R=1 To 25 : RESA$(R)="" : RESB$(R)="" : RES(R)=9 : Next R : RES=1
TITLE$=LG$(LG)+" Results" : TITLE
For L=1 To 22
For T=1 To MIL(L)
For X=1 To TEAMS(LG)
If T1FXL$(L,T)=TEAM$(LG,X)
RESA$(RES)=T1FXL$(L,T) : RESB$(RES)=T2FXL$(L,T)
If RES=1
Goto NC
End If
For Y=1 To RES-1
If RESA$(RES)=RESA$(Y)
RESA$(RES)="" : RESB$(RES)="" : Goto DC
End If
Next Y
NC:
Inc RES
DC:
End If
Next X
Next T
Next L
For X=1 To RES
For L=1 To 25
For Y=1 To TEAMS(L)
If RESA$(X)=TEAM$(L,Y) Then LGA(X)=L
If RESB$(X)=TEAM$(L,Y) Then LGB(X)=L
Next Y
Next L
Next X
Reserve Zone 25
Set Zone 1,186,100 To 204,117
Set Zone 3,186,119 To 204,136
Set Zone 5,186,138 To 204,155
Set Zone 7,186,157 To 204,174
Set Zone 9,186,176 To 204,193
Set Zone 11,186,195 To 225,212
Set Zone 2,207,100 To 225,117
Set Zone 4,207,119 To 225,136
Set Zone 6,207,138 To 225,155
Set Zone 8,207,157 To 225,174
Set Zone 10,207,176 To 225,193
Set Zone 12,341,100 To 358,117
Set Zone 14,341,119 To 358,136
Set Zone 16,341,138 To 358,155
Set Zone 18,341,157 To 358,174
Set Zone 20,341,176 To 358,193
Set Zone 22,341,195 To 380,212
Set Zone 13,362,100 To 380,117
Set Zone 15,362,119 To 380,136
Set Zone 17,362,138 To 380,155
Set Zone 19,362,157 To 380,174
Set Zone 21,362,176 To 380,193
Set Zone 23,254,117 To 309,128
Set Zone 24,254,137 To 309,148
Set Zone 25,254,157 To 309,168
If RES=1 Then Goto NLG
For R=1 To RES-1
CLEAR
T$(1)="Enter the result for this match." : T$(2)="Check it carefully before clicking on OK!" : HELPBOX
M$(1)=RESA$(R) : BX[75,20,1,3,6]
M$(1)=RESB$(R) : BX[320,20,1,3,6]
Paste Icon 102,52,17 : Paste Icon 412,52,17
M$(1)=" No Result" :
BX[249,60,1,1,6]
M$(1)=" Clear"
BX[249,80,1,1,6]
M$(1)=" OK"
BX[249,100,1,1,6]
SCORE1(R)=20 : SCORE2(R)=20
UD:
If SCORE1(R)=20 Then Ink 1,5 : Text 255,43,"--- "
If SCORE2(R)=20 Then Ink 1,5 : Text 500,43,"--- "
If SCORE1(R)<>20 Then Ink 1,5 : Text 255,43,Str$(SCORE1(R))+" "
If SCORE2(R)<>20 Then Ink 1,5 : Text 500,43,Str$(SCORE2(R))+" "
GM:
Z=Zone(X Mouse,Y Mouse)
If Mouse Click<>0 Then Goto GTSEL
If Key State(51)=True Then Z=24 : Goto GTSEL
If Key State(54)=True Then Z=23 : Goto GTSEL
If Key State(68)=True Then Z=25 : Goto GTSEL
If Key State(1)=True Then Z=2 : Goto GTSEL
If Key State(2)=True Then Z=3 : Goto GTSEL
If Key State(3)=True Then Z=4 : Goto GTSEL
If Key State(4)=True Then Z=5 : Goto GTSEL
If Key State(5)=True Then Z=6 : Goto GTSEL
If Key State(6)=True Then Z=7 : Goto GTSEL
If Key State(7)=True Then Z=8 : Goto GTSEL
If Key State(8)=True Then Z=9 : Goto GTSEL
If Key State(9)=True Then Z=10 : Goto GTSEL
If Key State(10)=True Then Z=1 : Goto GTSEL
If Key State(29)=True Then Z=13 : Goto GTSEL
If Key State(30)=True Then Z=14 : Goto GTSEL
If Key State(31)=True Then Z=15 : Goto GTSEL
If Key State(45)=True Then Z=16 : Goto GTSEL
If Key State(46)=True Then Z=17 : Goto GTSEL
If Key State(47)=True Then Z=18 : Goto GTSEL
If Key State(61)=True Then Z=19 : Goto GTSEL
If Key State(62)=True Then Z=20 : Goto GTSEL
If Key State(63)=True Then Z=21 : Goto GTSEL
If Key State(15)=True Then Z=12 : Goto GTSEL
Goto GM
GTSEL:
If Z=0 Then Goto GM
If Z<12 Then SCORE1(R)=Z-1 : BING : Goto SRT
If Z<23 Then SCORE2(R)=Z-12 : BING : Goto SRT
If Z=23 or Z=24 Then SCORE1(R)=20 : SCORE2(R)=20 : BING : Goto SRT
If Z=25 Then ACCEPT : Goto GTRES
SRT:
Goto UD
GTRES:
If SCORE1(R)=20 Then RES(R)=0 : Goto SS
If SCORE1(R)=SCORE2(R) Then RES(R)=3
If SCORE1(R)>SCORE2(R) Then RES(R)=1
If SCORE1(R)<SCORE2(R) Then RES(R)=2
SS:
Next R
For R=1 To RES-1
For T=1 To 25
If TEAM$(LGA(R),T)=RESA$(R)
RTA=T
End If
If TEAM$(LGB(R),T)=RESB$(R)
RTB=T
End If
Next T
Next R
NLG:
CLEAR
T$(1)="Please wait ... accessing next set of details." : HELPBOX
Next LG
D$(1)="OK, that's the results entered."
D$(2)="Pro-Football would now update it's system to take account of these results."
D$(4)="Please remember, that this HAS NOT happened in this demo version - the"
D$(5)="results database has not been updated."
D$(7)="The full version comes pre-loaded with all the necessary up-to-date results, all you"
D$(8)="need to do then is keep it up-to-date each week."
DTEXT
End Proc
'-----------------
Procedure LGEDIT
D$(1)="In the full version, you can create as many leagues as you like, whether"
D$(2)="they be UK or Australian."
D$(4)="You can still have a go at using the league editor in the demo, but none"
D$(5)="of the changes you make will be saved to disk."
DTEXT
LGED:
CLEAR
TITLE$="League Editor" : TITLE
LMEN:
For R=1 To 25
M$(R)=LG$(R)
Next R
T$(1)="Click on the league you wish to edit."
T$(4)="HELP AVAILABLE" : HELPBOX
M$(26)="Exit This Menu"
MEN[26,8]
OPT=Param
If OPT=26 Then Goto QUIT
NTER:
CLEAR
M$(1)="League Name"
M$(2)="Teams In League"
BX[85,80,2,2,7]
M$(1)="" : M$(2)=""
BX[305,80,1,3,7]
BX[305,93,1,3,7]
T$(1)="Enter the new name for the "+LG$(OPT)+"."
T$(2)="To keep the same name, just press RETURN."
T$(3)="To delete the league entirely, type DELETE."
T$(4)="To return to menu, press ESC."
HELPBOX
EX=0
GTTEXT[320,102,25,6,5]
If EX=1 Then Goto LMEN
RE$=Param$
If Lower$(RE$)="delete" Then Goto DELETE
If RE$<>"" Then LG$(OPT)=RE$
If RE$="" Then Text 320,102,LG$(OPT)
T$(1)="The number of teams in the league is currently"+Str$(TEAMS(OPT))+"."
T$(3)="You can either enter a new figure, or press RETURN to stick"
T$(4)="with the existing one."
HELPBOX
GN[320,115,25,2,6,5]
RE$=Param$
If RE$<>"" Then TEAMS(OPT)=Val(RE$)
If RE$="" Then Text 312,115,Str$(TEAMS(OPT))
LG=OPT
REDRAW:
CLEAR
TITLE$=LG$(LG) : TITLE
For R=1 To TEAMS(LG)
M$(R)=TEAM$(LG,R)
Next R
M$(TEAMS(LG)+1)="Exit This Menu"
T$(1)="Click on the team that you want to change."
T$(3)="Alternatively, press 'E' to edit all"+Str$(TEAMS(LG))+" teams."
HELPBOX
TEAMMEN=1 : EMOD=0
MEN[TEAMS(LG)+1,8]
TEAMMEN=0
If EMOD=1 Then Gosub AUTOEDIT : Goto REDRAW
If EMOD=2 Then Gosub TABLEED : Goto REDRAW
OPT=Param
If OPT=TEAMS(LG)+1 Then Goto LGED
CLEAR
M$(1)="Team Name (Team"+Str$(OPT)+")"
BX[85,80,1,2,7]
M$(1)=""
BX[305,80,1,3,6]
T$(1)="Enter the name of the team to replace "+TEAM$(LG,OPT)+"."
T$(3)="Just press RETURN if you want to leave it as it is."
HELPBOX
GTTEXT[320,102,25,6,5]
P$=Param$
If P$="" Then Goto REDRAW
TEAM$(LG,OPT)=P$
Goto REDRAW
QUIT:
T$(1)="Confirm that the details are correct by clicking on YES or NO."
HELPBOX
CLEAR
Pop Proc
AUTOEDIT:
BING
For OPT=1 To TEAMS(LG)
CLEAR
M$(1)="Team Name (Team"+Str$(OPT)+")"
BX[85,80,1,2,7]
M$(1)=""
BX[305,80,1,3,6]
T$(1)="Enter the name of the team to replace "+TEAM$(LG,OPT)+"."
T$(3)="Just press RETURN if you want to leave it as it is."
HELPBOX
GTTEXT[320,102,25,6,5]
P$=Param$
If P$="" Then Goto REDRAW2
TEAM$(LG,OPT)=P$
REDRAW2:
Next OPT
Return
DELETE:
LG$(OPT)="Un-Named League"
For B=1 To 25
TEAM$(OPT,B)="Un-Named Team"
FM$(OPT,B)="00000099999999"
Next B
Goto LGED
'
TABLEED:
CLEAR
TITLE$="Mid-Season Update" : TITLE
'
REQ[1,"This undocumented editor was used for testing purposes","during development. It allows you to edit","the internal league and form tables.","Are you sure you want to continue?",2,"YES","NO",""]
REQ[3,"Version 1.1 - Released September 1995","DEMO VERSION","(C) Copyright Ali Prior - All Rights Reserved",MEM$,1,"OK","",""]
End Proc
Procedure FXTURES
N:
CLEAR
TITLE$="Fixtures Menu" : TITLE
T$(1)="Please select an option."
T$(4)="Remember, HELP is available!"
HELPBOX
M$(1)="Create/Amend Fixture List"
M$(2)="Load Fixture File"
M$(3)="Delete Fixture File"
M$(4)="Go Back To Main Menu"
MEN[4,3]
O=Param
If O=1 Then CFIX : Goto N
If O=2 Then LDFIX : Goto N
If O=3 Then CLFIX : Goto N
If O=4 Then Pop Proc
Goto N
End Proc
Procedure SVFIX
RESAVE:
If ALTERFLAG=0 Then Pop Proc
TITLE$="Save Fixture File" : TITLE
D$(1)="Normally, the fixture lists you have just created would be saved to disk"
D$(2)="ready for you to re-load at a later date."
D$(4)="We won't bother with that in the demo, as you're not really going to be making"
D$(5)="any predictions anyway."
DTEXT
End Proc
Procedure LDFIX
'
TITLE$="Load Fixture File" : TITLE
D$(1)="In the full version, this option would load a fixture file that you created during"
D$(2)="a previous session. This means that you can split the whole process of creating"
D$(3)="lists, making predictions & entering results over the course of a week."
D$(5)="As this demo isn't being used 'for real' there isn't a lot of point in including"
D$(6)="this feature, so it has been removed."
DTEXT
End Proc
Procedure CFIX
TITLE$="Fixture Lists" : TITLE
ALTERFLAG=0
If MLISTEXIST=1 Then Goto GTMLIST
T$(1)="Click on OK to continue ..." : HELPBOX
REQ[2,"There are no fixtures currently in memory.","","You can either create a new fixtures list, or","load an existing one from disk.",3,"NEW","CANCEL","LOAD"]
I=Param
If I=1 Then Pop Proc
If I<>2 Then Goto NI
FLOADED=0
LDFIX
If FLOADED=1 Then Goto GTMLIST
Pop Proc
NI:
LIST=21
Goto CLIST
GTMLIST:
TITLE$="Fixture Lists" : TITLE
T$(1)="Select a list to create/edit/view ..." : HELPBOX
M$(1)="Main List"
If PLEXIST=1 Then M$(2)="Pools List"
If PLEXIST=0 Then M$(2)="Pools List N/A"
For L=1 To 20
M$(L+2)=FXLN$(L)
Next L
M$(23)="Exit This Menu"
MEN[23,4]
O=Param
If O=23 Then SVFIX : Pop Proc
LIST=O
If LIST=1 Then LIST=23
If LIST=2 Then LIST=24
If LIST>2 Then LIST=LIST-2
If PLEXIST=0 and LIST=22 Then REQ[2,"There is no pools list available!","","The list is automatically created when 58 matches","have been 'ticked' in the Main-List.",1,"OK","",""] : Goto GTMLIST
GTN:
If MIL(LIST)=0 Then Goto NLI
ADN=0
VFIX
If ADN=0 Then Goto GTMLIST
If ADN=1 Then MTCH=MIL(LIST)+1 : Goto CLIST
NLI:
Paste Icon 145,67,13
Paste Icon 193,110,8
T$(1)="Please enter the new name for "+FXLN$(LIST)+"."
T$(4)="To abandon, enter the name as 'quit'."
HELPBOX
Ink 1,3
Text 205,100,"New Name For This Sub-List:"
GTTEXT[220,119,20,2,3]
If Lower$(Param$)="quit" Then Goto GTMLIST
If Param$="" Then BONG : Goto GTN
FXLN$(LIST)=Param$
Goto CLIST
CLIST:
CLEAR
TITLE$=FXLN$(LIST) : TITLE
If ADN=0 Then MTCH=1
If ADN=1 Then LM$="???"
ADN=0
CLOOP:
ID$=FXLN$(LIST)+" - Match"+Str$(MTCH)
ID2$=""
If MTCH>1 Then ID2$="Last one entered was "+LM$
PS=1 : POOLSTAT(MTCH)=0
GTTEAM[ID$]
If ESC=9 Then Goto CLOOP
If ESC=1 Then MTCH=MTCH-1
If ESC=1 and MTCH=0 and LIST=21 Then BING : Pop Proc
If ESC=1 and MTCH=0 Then Goto GTMLIST
If ESC=1 and MTCH>0 Then ID$=FXLN$(LIST)+" - Match"+Str$(MTCH) : ID2$="Last one entered was "+LM$ : ESC=0
CLOOPC:
CLEAR
Paste Icon 145,67,13
CLOOPB:
If MLISTEXIST=1 Then Goto SKIPA
Paste Icon 157,115,13+PS : Paste Icon 231,115,16
Reserve Zone 4
Set Zone 1,207,158 To 241,181
Set Zone 2,244,158 To 279,181
Set Zone 3,281,158 To 316,181
Set Zone 4,318,158 To 353,181
Goto SKIPB
SKIPA:
Paste Icon 193,115,16
Reserve Zone 4
Set Zone 1,10,10 To 20,20
Set Zone 2,225,158 To 260,181
Set Zone 3,262,158 To 297,181
Set Zone 4,300,158 To 334,181
SKIPB:
Ink 2,3
Text 160,82,ID$
Ink 1,3
TX$=TEAMA$+" -V- "+TEAMB$
Text(465-Len(TX$))/2,100,TX$
T$(1)="Please check the above carefully ..." : HELPBOX
X:
I$=Lower$(Inkey$)
If I$="" Then Goto CFM
If I$="p" Then Z=1 : Goto GTC
If I$="r" Then Z=2 : Goto GTC
If Asc(I$)=13 Then Z=4 : Goto GTC
CFM:
Z=Zone(X Mouse,Y Mouse)
If Mouse Click=0 Then Goto X
GTC:
If Z=0 Then Goto X
If Z=1 and MLISTEXIST=0
BING
If PS=1
PS=2
Goto N
End If
If PS=2
PS=1
End If
N:
Goto CLOOPB
End If
If Z=2 Then Goto CLOOP
BING
T1FXL$(LIST,MTCH)=TEAMA$
T2FXL$(LIST,MTCH)=TEAMB$
POOLSTAT(MTCH)=PS
If Z=3
BING
T$(1)="Click on Yes or No." : HELPBOX
REQ[2,"","Are you sure that there are no more fixtures","to be included in this list?","",2,"YES","NO",""]
O=Param
If O=1
Goto CLOOPC
End If
MIL(LIST)=MTCH
If MLISTEXIST=0
Gosub MKPOOLS
End If
MLISTEXIST=1
Goto GTMLIST
End If
If Z=4
BING
Inc MTCH
LM$=TEAMA$+" -v- "+TEAMB$
Goto CLOOP
End If
Pop Proc
MKPOOLS:
'
PM=1
For R=1 To MIL(21)
If POOLSTAT(R)=1 Then T1FXL$(22,PM)=T1FXL$(21,R) : T2FXL$(22,PM)=T2FXL$(21,R) : Inc PM
If PM=59 Then Goto NM
Next R
'
NM:
PLEXIST=1
If PM=59 Then MIL(22)=58
If PM<>59 Then MIL(22)=PM-1
PLEXIST=1
Return
End Proc
Procedure VFIX
SM=0
MIL=MIL(LIST)
TITLE$=FXLN$(LIST) : TITLE
RESHOW:
T$(1)="If you want to alter a fixture, just click on it."
T$(2)="To add more fixtures to the list, click on 'Add More'"
T$(4)="Click on continue when finished viewing/amending this page."
HELPBOX
CLEAR
XEND=12
For R=1 To 12
If SM+R<=MIL Then M$(R)="Match"+Str$(R+SM) : CL$(R)=T2FXL$(LIST,SM+R) : BL$(R)=T1FXL$(LIST,SM+R)
If SM+R>MIL Then XEND=R-1 : Exit
Next R
If MIL<12 Then XEND=MIL
BX[29,5,XEND,1,2]
For R=1 To 12 : M$(R)=BL$(R) : Next R
BX[149,6,XEND,3,7]
For R=1 To 12 : M$(R)=CL$(R) : Next R
BX[368,6,XEND,3,7]
M$(1)="Continue ..." : BX[29,165,1,1,2]
M$(1)="Add More" : BX[473,165,1,1,2]
Reserve Zone 14
For R=1 To 12
Set Zone R,144,49+(R*13) To 421,60+(R*13)
Next R
Set Zone 13,144,222 To 199,233
Set Zone 14,367,223 To 421,233
'
X:
Z=Zone(X Mouse,Y Mouse)
If Mouse Click=0 Then Goto X
If Z=13 Then Goto CONT
If Z=14 Then ADN=1 : Pop Proc
If Z=0 Then Goto X
If Z>XEND Then Goto X
BING
ID$="Amending match"+Str$(SM+Z)+" - "+T1FXL$(LIST,SM+Z)+" v "+T2FXL$(LIST,SM+Z)
T$(2)="Please remember that you cannot get back what you delete!"
HELPBOX
MI=2
M$(1)="Fixtures In Memory"
If Exist("pro-Football:data/Fixture File 1")=True Then M$(MI)="Fixture File 1" : Inc MI
If Exist("pro-Football:data/Fixture File 2")=True Then M$(MI)="Fixture File 2" : Inc MI
If Exist("pro-Football:data/Fixture File 3")=True Then M$(MI)="Fixture File 3" : Inc MI
M$(MI)="Don't Delete"
MEN[MI,9]
O=Param
If O=MI Then Pop Proc
FILE$="Pro-Football:data/"+M$(O)
'
HELPBOX
REQ[2,"WARNING!","","Deleted fixture lists cannot be brought back to life!","Are you sure you want to delete "+M$(O)+"?",2,"YES","NO",""]
Y=Param
If Y=1 Then Pop Proc
T$(1)="Please Wait ..." : HELPBOX
REQ[3,"","Deleting "+M$(O),"","",0,"","",""]
If FILE$="Pro-Football:data/Fixtures In Memory" Then Goto MEMDEL
Kill FILE$
Pop Proc
MEMDEL:
For L=1 To 20
FXLN$(L)="Sub List"+Str$(L)
MIL(L)=0
For M=1 To 100
T1FXL$(L,M)=""
T2FXL$(L,M)=""
Next M
Next L
MIL(21)=0
MIL(22)=0
MLISTEXIST=0 : PLEXIST=0
End Proc
Procedure PFX
For M=1 To MIL(LIST)
F1=0 : F2=0
For LG=1 To 25
If Left$(TEAM$(LG,1),13)="Un-named Team" Then Goto NLG
For T=1 To 25
If F1=1 Then Goto CH2
If T1FXL$(LIST,M)<>TEAM$(LG,T) Then Goto CH2
T1LGP(LIST,M)=LGPOS(LG,T) : MLG1(LIST,M)=LG
T1M1(LIST,M)=TDM1(LG,T)
T1M2(LIST,M)=TDM2(LG,T)
F1=1 : Goto OK
CH2:
If F2=1 Then Goto RP
If T2FXL$(LIST,M)<>TEAM$(LG,T) Then Goto RP
T2LGP(LIST,M)=LGPOS(LG,T) : MLG2(LIST,M)=LG
T2M1(LIST,M)=TDM1(LG,T)
T2M2(LIST,M)=TDM2(LG,T)
F2=1 : Goto OK
OK:
If F1=1 and F2=1 Then Goto NM
RP:
Next T
NLG:
Next LG
NM:
Next M
NL:
End Proc
Procedure GTTEAM[ID$]
CLEAR
ALTERFLAG=1
Paste Icon 20,25,12
M$(1)=""
Ink 4,0
Text 300,185,"-v-"
Reserve Zone 39
Restore ZDAT
For R=1 To 29
Read X1(R),Y1(R),X2,Y2
Set Zone R,X1,Y1 To X2,Y2
Next R
For R=1 To 10
Set Zone R+29,319,63+(R*13) To 426,74+(R*13)
Next R
ZDAT:
Data 140,69,166,96,166,69,194,96,194,69,221,96,221,69,248,96,248,69,275,96,275,69,302,96
Data 140,96,166,124,166,96,194,124,194,96,221,124,221,96,248,124,248,96,275,124,275,96,302,124
Data 140,124,166,152,166,124,194,152,194,124,221,152,221,124,248,152,248,124,275,152,275,124,302,152
Data 140,152,166,180,166,152,194,180,194,152,221,180,221,152,248,180,248,152,275,180,275,152,302,180
Data 140,180,166,208,166,180,194,208,194,180,221,208,221,180,248,208,248,180,275,208
TSF=0
T$(1)=ID$
T$(2)=ID2$
T$(4)="Select a team ..." : HELPBOX
REDO:
Ink 0
Bar 370,15 To 640,175
M$(1)=" "
If TSF=0 Then BX[75,163,1,4,6]
BX[320,163,1,4,6]
NONE:
OZ=0 : NAME$="" : Q=0
X:
I$=""
KP=0
I$=Lower$(Inkey$)
If Asc(I$)=32 Then Z=27 : KP=1
If Asc(I$)>96 and Asc(I$)<123 Then Z=Asc(I$)-96 : KP=1
NAMES=Q
If KP=1 Then Goto S1
Z=Zone(X Mouse,Y Mouse)
S1:
If Z<>OZ and Z<30 Then Bob 1,X Screen(X1(Z))-11,Y Screen(Y1(Z))-4,1 : OZ=Z
If KP=1 Then Goto S2
If Mouse Click=0 Then Goto X
If Z=0 Then Goto X
S2:
Q=0
If Z<27 and Z>0 Then NAME$=NAME$+Chr$(Z+64)
If Z=27 Then NAME$=NAME$+" "
ESC=0
If Z=29 and Len(NAME$)<1 and TSF=0 Then ESC=1 : Pop Proc
If Z=29 Then ESC=9 : Pop Proc
If Z=28 and Len(NAME$)<=1 Then Goto REDO
If Z=28 and Len(NAME$)>1 Then NAME$=Left$(NAME$,(Len(NAME$)-1))
If Z>29 Then Gosub NSTANT : Q=NAMES : Goto X
M$(1)=NAME$+" "
If TSF=0 Then BX[75,163,1,4,6]
If TSF=1 Then BX[320,163,1,4,6]
LSF=Len(NAME$)
If TSF=1 Then Goto SL
For L=1 To 25
For T=1 To TEAMS(L)
If Lower$(TEAM$(L,T))="un-named team" Then Goto LP
If Lower$(Left$(TEAM$(L,T),LSF))=Lower$(NAME$) Then Inc Q : M$(Q)=TEAM$(L,T)
Next T
LP:
Next L
Goto CONT
SL:
For L=1 To 25
For T=1 To TEAMS(L)
If Lower$(TEAM$(L,T))="un-named team" Then Goto LP2
If Lower$(TEAM$(L,T))=Lower$(TEAMA$) Then Goto LP3
If Lower$(Left$(TEAM$(L,T),LSF))=Lower$(NAME$) Then Inc Q : M$(Q)=TEAM$(L,T) : If Q>10 Then Goto CONT
LP3:
Next T
LP2:
Next L
CONT:
If Q=0 Then BONG : Goto REDO
If Q=1 Then Goto GTTEAM1
BING
Ink 0
Bar 370,15 To 640,175
If Q>10 Then Goto X
BX[378,20,Q,2,7]
Goto X
GTTEAM1:
For L=1 To 13
For T=1 To TEAMS(L)
If Lower$(TEAM$(L,T))=Lower$(M$(Q)) Then CURRL=L : Goto FI
Next T
Next L
FI:
Inc TSF
ACCEPT
Ink 0 : Bar 370,15 To 640,175
M$(1)=M$(Q)
If TSF=1 Then BX[75,163,1,4,7] : TEAMA$=M$(Q)
If MLISTEXIST=0 Then Goto OK2
If NOCHK=1 Then Goto SKIPCHK
For R=1 To 100
If M$(Q)=T1FXL$(21,R)
TEAMB$=T2FXL$(21,R)
TSF=2
Pop Proc
End If
Next R
SKIPCHK:
OK2:
If TSF=2 Then BX[320,163,1,4,7] : TEAMB$=M$(Q)
If TSF=1 Then T$(1)=ID$ : T$(3)="And the other team ..." : HELPBOX : Goto NONE
Pop Proc
NSTANT:
If NAMES=0 Then Return
If Z>NAMES+29 Then Return
M$(Q)=M$(Z-29)
Goto GTTEAM1
Return
End Proc
'----------------------------------------------
Procedure DTEXT
CLEAR
Paste Icon 20,25,10
Ink 6,0
For R=1 To 15
Text 20,75+(R*10),D$(R)
D$(R)=""
Next R
T$(1)="Click mouse or press a key to continue ..." : HELPBOX
Clear Key
KOM:
I$=Inkey$
If Mouse Click=1 Then BING : Pop Proc
If I$="" Then Goto KOM
BING
End Proc
Procedure GTTEXT[X,Y,L,F,B]
REDO:
Clear Key
Ink F,B
C=X
TX$=""
CAP=1
NL:
If Len(TX$)<1 Then CAP=1
Text C,Y,TX$+"_ "
GTKEY:
I$=Lower$(Inkey$)
If I$="" Then Goto GTKEY
If Asc(I$)=8 Then TX$=Left$(TX$,Len(TX$)-1) : CAP=0 : Goto NL
If Asc(I$)=13 Then BING : Goto RETP
If Asc(I$)=27 Then BING : EX=1 : Pop Proc
If Asc(I$)=32 Then CAP=1 : Goto OK
If Asc(I$)<48 Then Goto GTKEY
If Asc(I$)<58 Then Goto OK
If Asc(I$)<97 Then Goto GTKEY
If Asc(I$)>122 Then Goto GTKEY
OK:
If Len(TX$)+1>L Then BONG : Goto GTKEY
If CAP=1 and Asc(I$)>60 Then I$=Chr$(Asc(I$)-32) : CAP=0
TX$=TX$+I$
Goto NL
RETP:
Text C,Y,TX$+" "
End Proc[TX$]
Procedure GN[X,Y,M,L,F,B]
REDO:
Clear Key
Ink F,B
C=X
TX$=""
NL:
Text C,Y,TX$+"_ "
If Len(TX$)=L Then BING : Goto RETP
GTKEY:
I$=Lower$(Inkey$)
If I$="" Then Goto GTKEY
If Asc(I$)=8 Then TX$=Left$(TX$,Len(TX$)-1) : Goto NL
If Asc(I$)=13 Then BING : Goto RETP
If Asc(I$)<48 Then Goto GTKEY
If Asc(I$)>57 Then Goto GTKEY
OK:
TX$=TX$+I$
If Val(TX$)>M Then BONG : Goto REDO
Goto NL
RETP:
Text C,Y,TX$+" "
End Proc[TX$]
Procedure BX[X,Y,N,T,I]
For R=1 To N
If T=4 Then T=5 : Y=Y-1
Paste Icon X,Y+(R*13),T+6
If T=1 Then Ink I,0
If T=2 Then Ink I,3
If T=3 Then Ink I,5
If T=5 Then Ink I,0
Text X+15,(Y+10)+(R*13),M$(R)
Next R
End Proc
Procedure REQ[T,L1$,L2$,L3$,L4$,B,B1$,B2$,B3$]
CLEAR
ACCEPT
L$(1)=L1$ : L$(2)=L2$ : L$(3)=L3$ : L$(4)=L4$
Paste Icon 110,45,1
Paste Icon 422,52,3+T
For R=1 To 4
L=Text Length(L$(R))
Ink 2,3
Text 310-L/2,101+(R*8),L$(R)
Next R
If B=0 Then Goto WFMP
Paste Icon 110,151,2
Reserve Zone 3
Set Zone 2,197,200 To 227,212
Set Zone 3,267,199 To 298,212
Set Zone 1,342,199 To 373,212
If B>0 Then Paste Icon 425,155,3
If B>1 Then Paste Icon 135,155,3
If B>2 Then Paste Icon 276,155,3
GM:
Z=Zone(X Mouse,Y Mouse)
If Z=1 Then Ink 6,3
If Z<>1 Then Ink 1,3
Text 458-(Text Length(B1$))/2,167,B1$
If Z=2 Then Ink 6,3
If Z<>2 Then Ink 1,3
Text 168-(Text Length(B2$))/2,167,B2$
If Z=3 Then Ink 6,3
If Z<>3 Then Ink 1,3
Text 309-(Text Length(B3$))/2,167,B3$
If Asc(Inkey$)=13 Then BING : Z=3 : Goto K
If Mouse Click=0 Then Goto GM
If Z=0 Then Goto GM
If Z>B Then Goto GM
Goto DN
WFMP:
'If Mouse Click=0 Then Goto WFMP
DN:
BING
If B<>0 Then CLEAR
If Z=2 Then Z=1 : Goto K
If Z=3 Then Z=2 : Goto K
If Z=1 Then Z=3 : Goto K
K:
End Proc[Z]
Procedure BING
Sam Play 5
End Proc
Procedure BONG
Sam Play 3
End Proc
Procedure CLEAR
Ink 0
Bar 0,15 To 640,195
End Proc
Procedure TITLE
Ink 7,3
Text 200,10," "
Text(313-Text Length(TITLE$))/2,10,TITLE$
End Proc
Procedure HELPBOX
Ink 4
Bar 20,205 To 464,239
Ink 1,4
For R=1 To 4
Text 25,205+(R*8),T$(R)
T$(R)=""
Next R
End Proc
Procedure HLP[P]
Screen Open 2,640,256,2,Hires
Cls 0
H$=Right$(Str$(P),Len(Str$(P))-1)
F$="pro-football:help/"+H$
Read Text F$
Screen Close 2
End Proc
Procedure MEN[N,HP]
MENU:
CLEAR
Reserve Zone N
D=0
If N>13 Then D=1
For R=1 To N
If D=0 Then XPOS=200
If D=1 and R<14 Then XPOS=75
If D=1 and R>13 Then XPOS=330
If D=0 Then Y=((185-N*13)/2)+(R*13)
If D=1 and R<14 Then Y=((185-13*13)/2)+(R*13)
If D=1 and R>13 Then Y=((185-13*13)/2)+((R-13)*13)
Set Zone R,XPOS,Y To XPOS+220,Y+13
Paste Icon XPOS,Y,8
Next R
X:
For R=1 To N
If Key State(95)=True and HP<>9 Then BING : HLP[HP] : Goto MENU
If D=0 Then XPOS=313 : Y=((185-N*13)/2)+(R*13)
If D=1 and R<14 Then XPOS=188 : Y=((185-13*13)/2)+(R*13)
If D=1 and R>13 Then XPOS=443 : Y=((185-13*13)/2)+((R-13)*13)
Ink 7,3
If R=Z Then Ink 6,3
If D=0 Then Text((XPOS-Text Length(M$(R)))/2),Y+9,M$(R)
If D=1 and R<14 Then Text((XPOS)-Text Length(M$(R)))/2,Y+9,M$(R)
If D=1 and R>13 Then Text((XPOS)-Text Length(M$(R)))/2,Y+9,M$(R)
Next R
If Key State(95)=True and HP<>9 Then BING : HLP[HP] : Goto MENU
If Key State(18)=True and TEAMMEN=1 Then EMOD=1 : Pop Proc
If Key State(89)=True and TEAMMEN=1 Then EMOD=2 : Pop Proc
Z=Hzone(X Mouse,Y Mouse)
If Mouse Click=0 Then Goto X
If Z=0 Then Goto X
BING
End Proc[Z]
Procedure INIT
T$(1)="Tread carefully!"
T$(2)="If in doubt, then CANCEL and read the User-Guide." : HELPBOX
REQ[3,"WARNING - POTENTIALLY DISASTROUS!","This function resets the league tables - permanently!","You can either reset ALL (names & form data),","or just SOME (form data only, leaving names intact).",3,"CANCEL","ALL","SOME"]
O=Param
If O=3 Then Pop Proc
TYPE=O
REQ[1,"","Are you ABSOLUTELY sure?","If in any doubt at all, select CANCEL.","",2,"CANCEL","SURE",""]
O=Param
If O=3 Then Pop Proc
If TYPE=2 Then Goto P2
T$(1)="Resetting Leagues ..." : T$(3)="When done, program will restart." : HELPBOX
Open Out 1,"pro-football:data/leagues"
For R=1 To 25
Print #1,"Un-Named League"
Print #1,25
LG$(R)="Un-Named League"
For N=1 To 25
Print #1,"Un-Named Team"
Print #1,"00000099999999"
TEAM$(R,N)="Un-Named Team"
Next N
Next R
Close 1
SETUP : MAINMENU
P2:
T$(1)="Resetting Tables ..." : T$(3)="When done, program will restart." : HELPBOX